import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str1 = in.nextLine();
        String emailMatch = "[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";
        if(str1.matches(emailMatch)){
            System.out.println("邮箱格式合法");
        }else{
            System.out.println("邮箱格式不合法");
        }
    }
}
